import java.util.ArrayList;

public class arraylist {
    // 添加三个学生
    public static ArrayList<Student> studentlist() {
        ArrayList<Student> studentArrayList = new ArrayList<>();
        Student student1 = new Student("1001", "张三", 20);
        Student student2 = new Student("1002", "李四", 20);
        studentArrayList.add(student1);
        studentArrayList.add(student2);
        return studentArrayList;
    }
}
